import { useRoutes } from 'react-router-dom';
import UsersView from '../views/UsersView';
import Home from '../views/HomeView';
import DataVis from '../views/DataVis';
import EventView from '../views/EventView';
import NoticeView from '../views/NoticeView';
import MonitorView from '../views/MonitorView';
import Test from '../views/Test';
import LoginView from '../views/LoginView';
const RouterView = () => {
  const routes = useRoutes([
    {
      name: 'home',
      path: '/',
      element: <Home />,
    },
    {
      name: 'dataVis',
      path: '/dataVis',
      element: <DataVis />,
    },
    {
      name: 'monitorView',
      path: '/monitorView',
      element: <MonitorView />,
    },
    {
      name: 'eventView',
      path: '/eventView',
      element: <EventView />,
    },
    {
      name: 'noticeView',
      path: '/noticeView',
      element: <NoticeView />,
    },
    {
      path: '/usersView',
      element: <UsersView />,
    },
    {
      path: '/test',
      element: <Test />,
    },
    {
      path: '/login',
      element: <LoginView />,
    },
  ]);

  return routes;
};
export default RouterView;
